﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CompanySearchConsole.MongoEntities
{
    public class RawQueryResult
    {

        public RawQueryResult()
        {
            Id = Guid.NewGuid();
        }
       
        public Guid Id { get; set; }
        
        public string Name { get; set; }

        public Session Session { get; set; }

        public string Info {get;set;}

        public long Duration { get; set; }

        public PartialResult StartsWith { get; set; }
        
        public PartialResult Contains { get; set; }

        public PartialResult GetByAttributes { get; set; }


        public string Discriminator { get; set; }

        public bool IsMax { get; set; }
    }

    public class PartialResult
    {
        public PartialResult()
        {
            PartialResults = new List<PartialResult>();
            Id = Guid.NewGuid();
        }


        public Guid Id { get; set; }
        
        public string Info { get; set; }

        public long Duration { get; set; }

        public int Count { get; set; }

        public int NScanned { get; set; }

        public string Cursor { get; set; }

        public bool ScanAndOrder { get; set; }

        public List<PartialResult> PartialResults { get; set; }

        public long? MeasuredDuration { get; set; }

    }

    public class Session
    {
        public int Id { get; set; }
        public int ParticipantsNo { get; set; }

        public DateTime Timestamp { get; set; }
    }

}
